import {userStore} from '@/stores/user'
import type { ICount } from '@/types/home'
import {ref,type Ref,onMounted} from 'vue'
import { useRouter } from 'vue-router'
export const useMine =()=>{
    let mine_info:Ref<ICount> =ref({})
    const stores = userStore()
    const router = useRouter()
    let Eshow:boolean = true
    let Lshow:boolean = false
    
    const getmine =()=>{
        mine_info.value = stores.count
        console.log(stores.getCount) 
    }
    const exit = ()=>{
        
        stores.delCount()
       
        mine_info.value = stores.count
       
    }
    if(!stores.count){
        Eshow = !Eshow
        Lshow = !Lshow
    }
onMounted(()=>{
     getmine()
})
return {mine_info,exit,Eshow,Lshow}
}